<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="客户分级" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addData('depot')"
                            ng-disabled="!btnPermission.clientLevelAdd"
                            translate translate-attr-title="{{!btnPermission.clientLevelAdd?'无权限执行此操作':''}}">新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()"
                            translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap">
                    <div class="th-scroll-x">
                        <table class="table border-none">
                            <thead>
                            <tr>
                                <th width="10%" translate>操作</th>
                                <th width="30%" translate>客户分级</th>
                                <th width="30%" translate>分级编号</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0">
                        <table class="table border-none">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index">
                                <td width="10%">
                                    <button class="btn btn-operate" ng-click="editData(item.id)"
                                            ng-disabled="!btnPermission.clientLevelEdit"
                                            translate translate-attr-title="{{!btnPermission.clientLevelEdit?'无权限执行此操作':''}}">编辑</button>
                                    <button class="btn btn-operate" ng-click="removeDepot(item.id)"
                                            ng-disabled="!btnPermission.clientLevelDel"
                                            translate translate-attr-title="{{!btnPermission.clientLevelDel?'无权限执行此操作':''}}">删除</button>
                                </td>
                                <td width="30%" class="spill-dots" title="{{item.levelName}}">
                                    {{item.levelName}}
                                </td>
                                <td width="30%" class="spill-dots" title="{{item.levelCode}}">{{item.levelCode}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
        </div>
        <div tab heading="{{depotTabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="main-area d-t-35 d-b-60">
                <form name="form" class="main-wrap form-horizontal single-col p-t clearfix" novalidate>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><i>*</i><span translate>分级名称</span>：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="id" class="form-control" ng-model="detailInfo.levelName" required
                                   yb-focus maxlength="30">
                        </div>
                        <div class="col-xs-4 msg-block" ng-show="form.id.$dirty || (form.id.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.id.$error.required && !form.id.focused">
                                <i class="yb-icon ico-times-circular"></i><span translate>必填项，请填写</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-2 control-label"><span translate>分级编号</span>：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="levelCode" class="form-control" ng-model="detailInfo.levelCode"
                                   yb-focus maxlength="30">
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-2 control-label"></label>
                        <div class="col-xs-5 wrapper-none">
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid, 'depot', 1,'depot')" translate>
                                保存
                            </button>
                            <button type="button" class="btn btn-default" ng-click="cancel(1)" translate>取消</button>
                        </div>
                    </div>

                </form>
            </div>
        </div>

    </div>
</div>


